package com.scedu.enums;

import lombok.Getter;

/*
枚举 需要构造方法 ，get方法
 */
@Getter
public enum ResultEnums {
    UNKONW_ERROR(-1,"未知错误"),
    SUCCESS(200,"成功"),
    PRODUCT_NOT_EXIT_ERROR(100,"商品不存在"),
    PRODUCT_NOT_ENOUGH_ERROT(101,"库存不足"),
    ORDER_NOT_EXIT_ERROR(102,"订单不存在"),
    ORDERS_NOT_EXIT_ERROR(103,"订单详情不存在"),
    ORDERS_STATUS_ERROR(104,"订单状态错误，不能取消"),
    ORDERS_UPDATE_ERROR(105,"订单更新错误"),
    ORDERS_DETAILNULL_ERROR(106,"订单中无商品"),
    ORDERS_FORM_ERROR(107,"表单参数不正确"),
    JSON_FORM_ERROR(108,"JSON转换错误"),
    ORDER_ITEMS_NULL_ERROR(109,"购物车为空"),
    ORDERS_LISTFORM_ERROR(110,"表单列表参数不正确"),
    OPENDI_ERROR(110,"openid不正确"),
    WX_MP_ERROR(111,"微信授权错误"),
    ORDER_AMOUNT_ERROR(112,"订单金额不一致"),
    PRODUCT_FORM_ERROR(113,"商品表单参数不正确"),
    LOGIN_ERROR(114,"登录失败"),
    LOGOUT_SUCCESS(115,"注销成功！"),

    ;
    private Integer code;
    private String msg;

    ResultEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


}
